local skel = fk.CreateSkill {
  name = "lb__anke",
}

Fk:loadTranslationTable {
  ["lb__anke"] = "安可",
  [":lb__anke"] = "<b>锁定技</b>，结束阶段，本回合成为过你牌的目标的角色依次选择是否令你视为使用一张雷【杀】，这些雷【杀】造成伤害后强制触发<a href=':lb__yaogun'><font color='red'>〖摇滚〗</font></a>。",

  ["#lb__anke"] = "安可：是否令 %src 视为使用一张雷【杀】",

  ["$lb__anke1"] = "接下来可是重头戏。",
  ["$lb__anke2"] = "捧场的人还不少。",
  ["$lb__anke3"] = "观众都等不及啦。",
}

skel:addEffect(fk.EventPhaseStart, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    if target == player and player:hasSkill(skel.name) and player.phase == Player.Finish then
      local tos = {}
      player.room.logic:getEventsOfScope(GameEvent.UseCard, 999, function(e)
        local use = e.data
        if use.from == player then
          if #use.tos > 0 then
            table.insertTableIfNeed(tos, use.tos)
          end
        end
      end, Player.HistoryTurn)
      event:setCostData(self, { tos = tos })
      return #tos > 0
    end
  end,
  on_cost = function(self, event, target, player, data)
    return #Fk:cloneCard("thunder__slash"):getDefaultTarget(player, { bypass_times = true }) > 0
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local tos = event:getCostData(self).tos
    room:sortByAction(tos)
    for _, v in ipairs(tos) do
      if not v.dead and room:askToSkillInvoke(v, {
            skill_name = skel.name,
            prompt = "#lb__anke:" .. player.id,
          }) then
        room:askToUseVirtualCard(player, {
          name = "thunder__slash",
          skill_name = skel.name,
          cancelable = false,
        })
      end
    end
  end,
})

return skel